<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
     <style>
      *{margin: 0px;padding: 0px;}
      div{
           box-sizing: border-box;
      }
      .parent{
          width: 1016px;
          margin-left: auto;margin-right: auto;
          background: #F7F7F7;
          /* 当使用inline-block布局，给父元素font-size:0 */
          font-size: 0 ;
      }
      .parent>div{
          display: inline-block;
          width: 240px;
          height: 300px;
          border: 1px solid #333;
          background: #EBEBEB
      }
      /* .parent>div:not(:last-child){
          margin-right:13.333px;
      } */
      .parent>.child{
          margin-right: 13.333px;
      }
     </style>

</head>
<body>
    <div class="parent">
            <div class="child"></div>
            <div class="child"></div>
            <div class="child"></div>
            <div class="child"></div>
    </div> 
    
</body>
</html>